package com.scetop.banking;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Bank {

private List<Customer> customers;
    public Bank(){
        customers = new ArrayList<>();
    }
    private static Bank bank = new Bank();
    public static Bank getBank(){
        return bank;
    }

    public void addCustomer(String f, String l){
       customers.add(new Customer(f,l));
    }

    public int getNumberOfCustomers(){
        return customers.size();
    }
    public Customer getCustomer(int index){
        return customers.get(index);
    }
    public Iterator<Customer> getCustomers(){
        return customers.iterator();
    }
}

